//
//  Basetabarcontroller.m
//  GiftSay
//
//  Created by lanou on 15/12/16.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "Basetabarcontroller.h"
#import "MainViewController.h"
#import "MyViewController.h"
#import "ClassViewController.h"
#import "HotViewController.h"
@interface Basetabarcontroller ()

@end

@implementation Basetabarcontroller
//dqjifohoihjoiqgtjhlwehjnoihwoiuugh
- (void)viewDidLoad {
    [super viewDidLoad];
    self.tabBar.tintColor = [UIColor redColor];
   // self.tabBar.barTintColor = [UIColor blackColor];
    //aasadafagrwtqretwqwerttwtwyr5terreqerqrqwrqwrreqere
    
    MainViewController*mainList=[[MainViewController alloc]init];
mainList.title=@"礼物说";
    HotViewController*hotlist=[[HotViewController alloc]init];
    hotlist.title=@"热门";
    ClassViewController*classList=[[ClassViewController alloc]init];
    //classList.title=@"分类";
    MyViewController*mylist=[[MyViewController alloc]init];
    mylist.title=@"我的";
    [self addChildViewController:mainList title:@"首页" image:@""];
    [self addChildViewController:hotlist title:@"热门" image:@""];
    [self addChildViewController:classList title:@"分类" image:@""];
    [self addChildViewController:mylist title:@"我的" image:@""];


}
- (void)addChildViewController:(UIViewController *)childController title:(NSString *)title image:(NSString *)image{
    
    UINavigationController *childVC = [[UINavigationController alloc]initWithRootViewController:childController];
    childVC.tabBarItem.title = title;
    childVC.tabBarItem.image = [UIImage imageNamed:image];
    childVC.navigationBar.barTintColor = [UIColor whiteColor];
    [self addChildViewController:childVC];
    
}






- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
